# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: team/kde <fcolista@alpinelinux.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=phonon-backend-gstreamer
pkgver=4.10.0
pkgrel=6
pkgdesc="Phonon gstreamer backend for Qt5"
url="https://userbase.kde.org/Phonon"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
license="LGPL-2.1-only OR LGPL-3.0-only"
makedepends="
	extra-cmake-modules
	gst-plugins-base-dev
	gstreamer-dev
	libxml2-dev
	phonon-dev
	qt5-qttools-dev
	qt5-qtx11extras-dev
	samurai
	"
subpackages="$pkgname-lang"
source="https://download.kde.org/stable/phonon/phonon-backend-gstreamer/$pkgver/phonon-backend-gstreamer-$pkgver.tar.xz"
options="!check" # No tests available

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DPHONON_BUILD_PHONON4QT5=ON
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
3beaba9ea3a332a6908ebdaa966958e8e8056d79cfb210e82a8edaf08f0a8bacbf8094e91b1b1b936406aa634dabb962e6c1468e4dde3febd9efac1a63ea70a4  phonon-backend-gstreamer-4.10.0.tar.xz
"
